Skip to content

Conversation

@Certseeds
Copy link
Owner

  1. 大幅度更新模板, 现在更方便, 内嵌了加速指令, 并且更新了许可证, 现在模板文件全部为Apache 2.0协议
  2. 加入2021fall的问题, 答案, 解析.

Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
GPT5真的能秒 ICPC-2025 吗?

Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Signed-off-by: Certseeds <51754303+Certseeds@users.noreply.github.com>
Copilot AI review requested due to automatic review settings October 4, 2025 10:44
@Certseeds Certseeds added the enhancement New feature or request label Oct 4, 2025
@Certseeds Certseeds changed the title Dev want to release v0.13.0 Oct 4, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces template updates with embedded acceleration instructions and license changes to Apache 2.0, along with adding 2021 Fall exam problems, answers, and solutions.

  • Major template upgrade with embedded acceleration instructions and Apache 2.0 license
  • Addition of 2021 Fall lab problems with complete implementations
  • Comprehensive algorithm solutions across multiple lab topics (linked lists, sorting, stacks/queues, strings, trees)

Reviewed Changes

Copilot reviewed 293 out of 599 changed files in this pull request and generated 4 comments.

File Description
Multiple lab_XX directories Complete 2021 Fall semester lab problems with solutions and test cases
CMakeLists.txt files Build configuration updates for new problem structure
README.md files Algorithm analysis and problem descriptions for each lab
main.cpp files Complete algorithm implementations for all problems

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -0,0 +1,247 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description mentions files are now under Apache 2.0 license, but the SPDX header still shows AGPL-3.0-or-later. This inconsistency should be resolved.

Suggested change
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-License-Identifier: Apache-2.0

Copilot uses AI. Check for mistakes.
Comment on lines +164 to +176
if (rev[u] == 0) {
while (!buckets[bu].empty()) {
int x = buckets[bu].back();
buckets[bu].pop_back();
buckets[bv].push_front(x);
}
} else {
while (!buckets[bu].empty()) {
int x = buckets[bu].front();
buckets[bu].pop_front();
buckets[bv].push_front(x);
}
}
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Duplicated logic for bucket transfer operations. This code pattern appears multiple times with only minor variations. Consider extracting a helper function to reduce duplication.

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +13
#pragma GCC optimize("-finline-small-functions")
#pragma GCC target("avx,avx2,sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The target instruction set is quite aggressive and may not be compatible with all systems. Consider using a more conservative target or making it conditional.

Suggested change
#pragma GCC optimize("-finline-small-functions")
#pragma GCC target("avx,avx2,sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
#pragma GCC optimize("-finline-small-functions")
#ifdef ALGORITHM_ENABLE_AGGRESSIVE_TARGET
#pragma GCC target("avx,avx2,sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native")
#endif

Copilot uses AI. Check for mistakes.
}

static const auto faster_streams = [] {
srand(time(nullptr));
Copy link

Copilot AI Oct 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using time(nullptr) for seeding is predictable and not cryptographically secure. Consider using std::random_device for better randomness quality.

Copilot uses AI. Check for mistakes.
@Certseeds Certseeds merged commit a87e3c1 into master Oct 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

2 participants